#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>

int main()
{
    int fd = open("log.txt", O_WRONLY | O_CREAT | O_TRUNC);
    int arr[10] = {1,2,3,4,5,6,7,8,9,0  };
    write(fd, arr, 0666);
    close(fd);

    return 0;
}
